package com.pattern.decorator;

/**
 * @Description: 具体装饰类
 * @Author: whp
 * @Date: 2021-02-07 10:43
 */
public class ConcreteDecorator extends Decorator {
    /*
     * @Description: 被配置者
     * @Param: [comopent]
     * @return
     **/
    public ConcreteDecorator(Comopent comopent) {
        super(comopent);
    }

    @Override
    public void opr() {
        method();
        //调用父类的构造
        super.opr();
    }

    /*
     * @Description: 要装饰的方法
     * @Param: []
     * @return void
     **/
    public void method(){
        System.out.println("添加装饰1");
    }
}
